<!DOCTYPE html><html lang="zh-Hans"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"><meta name="description" content="huluo的技术博客"><meta name="keywords" content=""><meta name="author" content="kyren"><meta name="copyright" content="kyren"><title>Stay hungry, stay foolish | Kyren's Blog</title><link rel="shortcut icon" href="/melody-favicon.ico"><link rel="stylesheet" href="/css/index.css?version=1.9.0"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@latest/css/font-awesome.min.css?version=1.9.0"><meta name="format-detection" content="telephone=no"><meta http-equiv="x-dns-prefetch-control" content="on"><link rel="dns-prefetch" href="https://cdn.jsdelivr.net"><link rel="dns-prefetch" href="https://hm.baidu.com"><script>var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?cf87fcdbd9ab7cf93d894f7c219ae78f";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();</script><meta http-equiv="Cache-Control" content="no-transform"><meta http-equiv="Cache-Control" content="no-siteapp"><script src="https://v1.hitokoto.cn/?encode=js&amp;charset=utf-8&amp;select=.footer_custom_text" defer></script><script>var GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容:${query}"}},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  hexoVersion: '6.2.0'
} </script><meta name="generator" content="Hexo 6.2.0"></head><body><i class="fa fa-arrow-right" id="toggle-sidebar" aria-hidden="true"></i><div id="sidebar" data-display="false"><div class="author-info"><div class="author-info__avatar text-center"><img src="https://avatars.githubusercontent.com/u/5827823?v=4"></div><div class="author-info__name text-center">kyren</div><div class="author-info__description text-center">huluo的技术博客</div><div class="follow-button"><a target="_blank" rel="noopener" href="https://github.com/huluo666">Follow Me</a></div><hr><div class="author-info-articles"><a class="author-info-articles__archives article-meta" href="/archives"><span class="pull-left">文章</span><span class="pull-right">239</span></a><a class="author-info-articles__tags article-meta" href="/tags"><span class="pull-left">标签</span><span class="pull-right">41</span></a><a class="author-info-articles__categories article-meta" href="/categories"><span class="pull-left">分类</span><span class="pull-right">29</span></a></div><hr><div class="author-info-links"><div class="author-info-links__title text-center">Links</div><a class="author-info-links__name text-center" target="_blank" rel="noopener" href="http://192.168.2.212:9090/">Jira</a><a class="author-info-links__name text-center" target="_blank" rel="noopener" href="http://192.168.2.212:8090/">Confluence</a><a class="author-info-links__name text-center" target="_blank" rel="noopener" href="http://bloc.leniugame.com/">Leniu</a></div></div></div><nav class="no-bg" id="nav"><div id="page-header"><span class="pull-left"> <a id="site-name" href="/">Kyren's Blog</a></span><i class="fa fa-bars toggle-menu pull-right" aria-hidden="true"></i><span class="pull-right menus">   <a class="site-page" href="/">主页</a><a class="site-page" href="/essay">随笔</a><a class="site-page" href="/archives">归档</a><a class="site-page" href="/tags">标签</a><a class="site-page" href="/categories">分类</a><a class="site-page" href="/about">关于</a></span><span class="pull-right"><a class="site-page social-icon search"><i class="fa fa-search"></i><span> 搜索</span></a></span></div><div id="site-info"><div id="site-title">Kyren's Blog</div><div id="site-sub-title">Stay hungry, stay foolish</div><div id="site-social-icons"><a class="social-icon" href="https://github.com/huluo666" target="_blank" rel="noreferrer noopener nofollow"><i class="fa-github fa"></i></a></div></div></nav><div id="content-outer"><div class="layout" id="content-inner"><div class="recent-post-item article-container"><a class="article-title" href="/2017/04/25/%E6%89%93%E5%8C%85ipa/">这可能是最快的打包IPA方式吧</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2017-04-25</time><span class="article-meta"><span class="article-meta__separator">|</span><i class="fa fa-inbox article-meta__icon" aria-hidden="true"></i><a class="article-meta__categories" href="/categories/iOS/">iOS</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fa fa-tag article-meta__icon" aria-hidden="true"></i><a class="article-meta__tags" href="/tags/iOS/">iOS</a></span><div class="content">测试发现用脚本自动打包时间和用xcode正常的打包方式时间基本一样，只是少了些手动点击步骤。而采用以下方法时间大大缩小。
第一步、使用iTunes将app打包成ipa
第二步、使用重签名工具重签名https://github.com/DanTheMan827/ios-app-signer

​    ...</div><a class="more" href="/2017/04/25/%E6%89%93%E5%8C%85ipa/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2017/04/24/iOS%20IPA%E9%87%8D%E7%AD%BE%E5%90%8D/">iOSipa重签名</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2017-04-24</time><span class="article-meta"><span class="article-meta__separator">|</span><i class="fa fa-inbox article-meta__icon" aria-hidden="true"></i><a class="article-meta__categories" href="/categories/iOS/">iOS</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fa fa-tag article-meta__icon" aria-hidden="true"></i><a class="article-meta__tags" href="/tags/iOS/">iOS</a></span><div class="content"> 获取签名证书列表
http://stackoverflow.com/questions/7747230/determining-codesigning-identities-from-the-command-line
http://stackoverflow.com/questions/51608 ...</div><a class="more" href="/2017/04/24/iOS%20IPA%E9%87%8D%E7%AD%BE%E5%90%8D/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2017/04/21/const%E5%B8%B8%E9%87%8F%E4%B8%8Edefine%E5%AE%8F%E5%AE%9A%E4%B9%89%EF%BC%8C%E7%BB%93%E6%9E%84%E4%BD%93%E7%9A%84%E5%8C%BA%E5%88%AB/">const常量与define宏定义，结构体的区别</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2017-04-21</time><span class="article-meta"><span class="article-meta__separator">|</span><i class="fa fa-inbox article-meta__icon" aria-hidden="true"></i><a class="article-meta__categories" href="/categories/iOS/">iOS</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fa fa-tag article-meta__icon" aria-hidden="true"></i><a class="article-meta__tags" href="/tags/iOS/">iOS</a></span><div class="content">#define和const区别(1) 编译器处理方式不同

编译时刻:define宏是预编译（编译之前处理），const是编译运行阶段。

(2) 类型和编译安全检查不同

define宏没有类型，不做任何类型检查，仅仅是替换展开，不会报编译错误。
const常量有具体的类型，在编译阶段会执行类型检 ...</div><a class="more" href="/2017/04/21/const%E5%B8%B8%E9%87%8F%E4%B8%8Edefine%E5%AE%8F%E5%AE%9A%E4%B9%89%EF%BC%8C%E7%BB%93%E6%9E%84%E4%BD%93%E7%9A%84%E5%8C%BA%E5%88%AB/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2017/04/20/iOS%E5%B8%B8%E6%95%B0%E7%9A%84%E5%AE%9A%E4%B9%89/">iOS常数的定义</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2017-04-20</time><span class="article-meta"><span class="article-meta__separator">|</span><i class="fa fa-inbox article-meta__icon" aria-hidden="true"></i><a class="article-meta__categories" href="/categories/iOS/">iOS</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fa fa-tag article-meta__icon" aria-hidden="true"></i><a class="article-meta__tags" href="/tags/iOS/">iOS</a></span><div class="content">在开发中很多人喜欢使用宏定义，但宏定义也有很多缺点。
下面看stackoverflow达人们如果解决常量问题。
12345struct CGSize &#123;   CGFloat width;   CGFloat height;&#125;;typedef struct CGSize CGSiz ...</div><a class="more" href="/2017/04/20/iOS%E5%B8%B8%E6%95%B0%E7%9A%84%E5%AE%9A%E4%B9%89/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2017/04/20/iOS%E9%A1%B5%E9%9D%A2%E6%A8%AA%E7%AB%96%E5%B1%8F%E5%88%87%E6%8D%A2/">iOS页面横竖屏自由切换适配</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2017-04-20</time><span class="article-meta"><span class="article-meta__separator">|</span><i class="fa fa-inbox article-meta__icon" aria-hidden="true"></i><a class="article-meta__categories" href="/categories/iOS/">iOS</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fa fa-tag article-meta__icon" aria-hidden="true"></i><a class="article-meta__tags" href="/tags/iOS/">iOS</a></span><div class="content">横竖屏控制加入以下3个函数即可
123456789101112131415#pragma mark--禁止横屏- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation&# ...</div><a class="more" href="/2017/04/20/iOS%E9%A1%B5%E9%9D%A2%E6%A8%AA%E7%AB%96%E5%B1%8F%E5%88%87%E6%8D%A2/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2017/04/13/iOS%E5%BC%80%E5%8F%91SQL%E4%BD%BF%E7%94%A8/">iOS开发SQL使用</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2017-04-13</time><span class="article-meta"><span class="article-meta__separator">|</span><i class="fa fa-inbox article-meta__icon" aria-hidden="true"></i><a class="article-meta__categories" href="/categories/iOS/">iOS</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fa fa-tag article-meta__icon" aria-hidden="true"></i><a class="article-meta__tags" href="/tags/iOS/">iOS</a></span><div class="content">在ios项目中使用sqlite需要添加 libsqlite3.dylib库
SQL语句的特点

不区分大小写（比如数据库认为insert和InSerT是一样的）每条语句都必须以分号 “ ; ” 结尾。

SQL中常用关键字

select、insert、update、delete、from、crea ...</div><a class="more" href="/2017/04/13/iOS%E5%BC%80%E5%8F%91SQL%E4%BD%BF%E7%94%A8/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2017/04/13/iOS%2011%20%E5%92%8C%20iPhone%20X%20%E9%80%82%E9%85%8D/">iOS 11 和 iPhone X 适配问题集锦</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2017-04-13</time><span class="article-meta"><span class="article-meta__separator">|</span><i class="fa fa-inbox article-meta__icon" aria-hidden="true"></i><a class="article-meta__categories" href="/categories/iOS/">iOS</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fa fa-tag article-meta__icon" aria-hidden="true"></i><a class="article-meta__tags" href="/tags/iOS/">iOS</a></span><div class="content">iOS 11 和 iPhone X 适配问题集锦http://wetest.qq.com/lab/view/337.htmlhttp://www.jianshu.com/p/f5ee206c7df0https://developer.apple.com/cn/ios/update-apps-for- ...</div><a class="more" href="/2017/04/13/iOS%2011%20%E5%92%8C%20iPhone%20X%20%E9%80%82%E9%85%8D/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2017/04/13/iOS%20%E5%BC%80%E5%8F%91%E5%B8%B8%E7%94%A8%E8%AE%A1%E7%AE%97%E6%B1%87%E6%80%BB/">无题</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2017-04-13</time><span class="article-meta"><span class="article-meta__separator">|</span><i class="fa fa-inbox article-meta__icon" aria-hidden="true"></i><a class="article-meta__categories" href="/categories/iOS/">iOS</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fa fa-tag article-meta__icon" aria-hidden="true"></i><a class="article-meta__tags" href="/tags/iOS/">iOS</a></span><div class="content">1、计算UIScrollView页码
12345678910111213#pragma mark - UIScrollView delegat- (NSInteger)currentPageWithScrollView:(UIScrollView *)scrollView &#123;    //  ...</div><a class="more" href="/2017/04/13/iOS%20%E5%BC%80%E5%8F%91%E5%B8%B8%E7%94%A8%E8%AE%A1%E7%AE%97%E6%B1%87%E6%80%BB/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2017/04/13/iOS%20%E9%AB%98%E6%96%AF%E6%A8%A1%E7%B3%8A/">iOS 高斯模糊</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2017-04-13</time><span class="article-meta"><span class="article-meta__separator">|</span><i class="fa fa-inbox article-meta__icon" aria-hidden="true"></i><a class="article-meta__categories" href="/categories/iOS/">iOS</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fa fa-tag article-meta__icon" aria-hidden="true"></i><a class="article-meta__tags" href="/tags/iOS/">iOS</a></span><div class="content">12345678910111213141516dispatch_async(dispatch_get_global_queue(0, 0), ^&#123;        CIContext *context = [CIContext contextWithOptions:nil];         ...</div><a class="more" href="/2017/04/13/iOS%20%E9%AB%98%E6%96%AF%E6%A8%A1%E7%B3%8A/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2017/04/11/mock2easy%E7%9A%84%E4%BD%BF%E7%94%A8/">mock2easy的使用</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2017-04-11</time><span class="article-meta"><span class="article-meta__separator">|</span><i class="fa fa-inbox article-meta__icon" aria-hidden="true"></i><a class="article-meta__categories" href="/categories/node-js/">node.js</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fa fa-tag article-meta__icon" aria-hidden="true"></i><a class="article-meta__tags" href="/tags/node-js/">node.js</a></span><div class="content">​	开发时一直使用node.js来模拟API，都是手写js进行接口模拟，一直有个想法可以在网页上进行操作，鼠标简单点几下就模拟一个API,奈何对html，css等不是很熟悉，而mock2easy是非常方便的可视化模拟API工具。
https://www.npmjs.com/package/mock2 ...</div><a class="more" href="/2017/04/11/mock2easy%E7%9A%84%E4%BD%BF%E7%94%A8/#more" style="margin-top: 14px">阅读更多</a><hr></div><nav id="pagination"><div class="pagination"><a class="extend prev" rel="prev" href="/page/10/"><i class="fa fa-chevron-left"></i></a><a class="page-number" href="/">1</a><span class="space">&hellip;</span><a class="page-number" href="/page/10/">10</a><span class="page-number current">11</span><a class="page-number" href="/page/12/">12</a><span class="space">&hellip;</span><a class="page-number" href="/page/24/">24</a><a class="extend next" rel="next" href="/page/12/"><i class="fa fa-chevron-right"></i></a></div></nav></div></div><footer><div class="layout" id="footer"><div class="copyright">&copy;2022 By kyren</div><div class="framework-info"><span>驱动 - </span><a target="_blank" rel="noopener" href="http://hexo.io"><span>Hexo</span></a><span class="footer-separator">|</span><span>主题 - </span><a target="_blank" rel="noopener" href="https://github.com/Molunerfinn/hexo-theme-melody"><span>Melody</span></a></div><div class="footer_custom_text">hitokoto</div><div class="busuanzi"><script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><span id="busuanzi_container_site_uv"><i class="fa fa-user"></i><span id="busuanzi_value_site_uv"></span><span></span></span><span class="footer-separator">|</span><span id="busuanzi_container_site_pv"><i class="fa fa-eye"></i><span id="busuanzi_value_site_pv"></span><span></span></span></div></div></footer><i class="fa fa-arrow-up" id="go-up" aria-hidden="true"></i><script src="https://cdn.jsdelivr.net/npm/animejs@latest/lib/anime.min.js"></script><script src="https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js"></script><script src="https://cdn.jsdelivr.net/npm/velocity-animate@latest/velocity.min.js"></script><script src="https://cdn.jsdelivr.net/npm/velocity-ui-pack@latest/velocity.ui.min.js"></script><script src="/js/utils.js?version=1.9.0"></script><script src="/js/fancybox.js?version=1.9.0"></script><script src="/js/sidebar.js?version=1.9.0"></script><script src="/js/copy.js?version=1.9.0"></script><script src="/js/fireworks.js?version=1.9.0"></script><script src="/js/transition.js?version=1.9.0"></script><script src="/js/scroll.js?version=1.9.0"></script><script src="/js/head.js?version=1.9.0"></script><script src="/js/search/local-search.js"></script><script>if(/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)) {
  $('#nav').addClass('is-mobile')
  $('footer').addClass('is-mobile')
  $('#top-container').addClass('is-mobile')
}</script><div class="search-dialog" id="local-search"><div class="search-dialog__title" id="local-search-title">本地搜索</div><div id="local-input-panel"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章"></div></div></div><hr><div id="local-search-results"><div id="local-hits"></div><div id="local-stats"><div class="local-search-stats__hr" id="hr"><span>由</span> <a target="_blank" rel="noopener" href="https://github.com/wzpan/hexo-generator-search" style="color:#49B1F5;">hexo-generator-search</a>
 <span>提供支持</span></div></div></div><span class="search-close-button"><i class="fa fa-times"></i></span></div><div class="search-mask"></div></body></html>